package com.contract.spirit.func

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

class FrgViewPagerAdapter(
    fm: FragmentManager?, //创建一个List<Fragment>
    private val listfragment: List<Fragment>
) : FragmentPagerAdapter(
    fm!!
) {
    override fun getItem(arg0: Int): Fragment {
        return listfragment[arg0] //返回第几个fragment
    }

    override fun getCount(): Int {
        return listfragment.size //总共有多少个fragment
    }
}